
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    listinfo: {
      type: Array,
      value: ''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    tipsList: [],
  },
  /** 组件的生命周期 **/
  lifetimes: {
    attached: function () {
      getApp().globalData.loginPromise.then(() => {})
    },
    detached: function () {},
  },
  /**
   * 组件的方法列表
   */
  methods: {
    // 查看房源详情
    _gotoHouseInfo(e) {
      let house = e.currentTarget.dataset.house
      if (house.houseIsMy) {
        wx.redirectTo({
          url: `/pages/house/RentalHouseDetail/coopertionHouseInfo/coopertionHouseInfo?cooperationId=${house.cooperationId}`,
        });
      } else {
        wx.redirectTo({
          url: `/pages/house/RentalHouseDetail/teamworkHouseDetail/teamworkHouseDetail?cooperationId=${house.cooperationId}`,
        });
      }
    },

    //去聊天
    _gotoChat(e) {
      let unionid = e.currentTarget.dataset.unioid
      let cooperationId = e.currentTarget.dataset.cooperationid
      wx.navigateTo({
        url: `/pages/im/imMessagelist/imMessagelist?unionid=${unionid}&cooperationId=${cooperationId}`
      });
    },
  }
})